package com.xin.di.uav.common.enums;

/**
 * @author jianwen.lu
 * @version 1.0
 * @description 业务错误异常
 * @date 2020-07-15 9:25
 * @since 1.8
 */
public enum ErrorEnum {
    /**
     * ERR_NOT_FOUND_COUPON：优惠券不存在或未启用
     */
    ERR_CLIENT_PARAM(400, "参数错误"), ERR_RECORD_NOT_FOUND(404, "{0}:{1}记录不存在"), ERR_PER_NOT_PERMISSION(403, "操作权限不允许"), LOST_SETTING(1001, "配置缺失"), VISIT_TO_LOGIN(2, "现在是游客模式，请重新登录"), ERROR_DATA_TRANSFORM_FAILED(2002, "Bean转换异常"), NO_TOKEN(300, "token缺失"), DECRYPTING_CODE_EXCEPTION(301, "解密code异常"),


    //1000任务
    OVERSTEP(1001, "执行中任务超过数量"), NOT_WAIT_CONFIRM(1002, "不是等待确认/起飞状态"), NOT_WAIT_PAY_OR_PENDING_OR_PICKUP(1003, "不是待支付/待揽件状态/上门取货中"),

    NOT_WAIT_PAY(1004, "不是待支付状态"), REFUNDED(1005, "已退款"), NOT_WAIT_PAY_OR_ORDER_ACCEPTANCE(1006, "不是待支付/等待平台接单/物资准备中状态"), //2000短信相关
    SEND_SMS_FAIL(2001, "发送短信失败"),

    //3000定价相关
    PRICE_MISSING(3001, "价格缺失"),

    //4000用户相关
    ABNORMAL_USER(4001, "异常用户"),

    //5000商品相关
    COMMODITY_NONE(5001, "售罄"), COMMODITY_LIMIT(5002, "商品不足"), COMMODITY_DOWN(5003, "商品下架"), COMMODITY_LIST_UN_NORMAL(5004, "商品列表异常"),

    //6000订单相关
    ORDER_HAD_CANCEL(6001, "订单已取消"),

    //9000
    REPEATED_SUBMISSION(9000, "重复提交"),

    //10000
    INVALID_TOKEN(10000, "token无效"),

    APP_KEY_INVALID(11000, "appKey无效"),

    CHECK_USER_ABNORMAL(12000, "越权操作用户"),


    INSUFFICIENT_CREDIT_LIMIT(13000, "企业额度不足");;

    private int errCode;
    private String errMsg;

    ErrorEnum(int errCode, String errMsg) {
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

}
